package library

import (
	"errors"
	"go_payment/app/library/pay"
	"strings"
)

func PayFactory(channelCode string) (pay.IPay, error) {
	code := strings.ToLower(channelCode)
	switch code {
	case "alipayf2f":
		return pay.NewAlipayF2F(), nil
	default:
		return nil, errors.New("渠道文件信息未找到")
	}
}
